package com.iursp.validate.code.sms;

import org.apache.log4j.Logger;
import com.iursp.domain.Const;
import com.iursp.utils.MessageUtils;
import com.iursp.validate.code.model.CommonMessage;


/**
 * 
 * @ClassName: DefaultSmsCodeSender
 * @Description:发送短信
 * @author: ruiwu
 * @date: 2018年6月25日 下午7:36:38
 *
 */
public class DefaultSmsCodeSender implements SmsCodeSender {
	
	private static Logger logger = Logger.getLogger(DefaultSmsCodeSender.class);

	@Override
	public void send(String mobile, String code) {
		logger.info("向手机" + mobile + "发送短信验证码" + code);
		String content = "{\"code\":'" + code + "'}";
		MessageUtils.SendMessage(new CommonMessage(Const.SMS_VERIFICATION_CODE,content,mobile));
		//logger.info("返回值:"+result);
	}


	

}
